package com.phelon.epdm;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.sql.SQLException;
import java.util.List;
import java.util.ArrayList;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.XPath;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;

import com.phelon.systemLink.SessionInfo;
import com.phelon.systemLink.SessionManager;

public class ItemXMLBuilder extends XMLBuilder{
	
private ItemRevisionA 	theItemA;
	private ItemRevisionB 	theItemB;
	private ItemRevisionC 	theItemC;
	
	public static void main(String[] args) {
		ItemRevisionA testRevA = new ItemRevisionA("A  ", "ASP9802536", "      ");
		try {
			testRevA.retrieveRecord("7T");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ItemRevisionB testRevB = new ItemRevisionB("A  ", "ASP9802536", "      ");
		try {
			testRevB.retrieveRecord("7T");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ItemRevisionC testRevC = new ItemRevisionC("A  ", "ASP9802536", "      ");
		try {
			testRevC.retrieveRecord("7T");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ItemXMLBuilder builder = new ItemXMLBuilder(testRevA, testRevB, testRevC, "7M");
		builder.doCreate();
		System.exit(0);
			}
	public ItemXMLBuilder(ItemRevisionA theItemA,ItemRevisionB theItemB, ItemRevisionC theItemC, String toEnv) {
		this.theItemA = theItemA;
		this.theItemB = theItemB;
		this.theItemC = theItemC;
		setEnvironmentID(toEnv);
	}
		
	
	public void buildCreateXML(SessionInfo theSession) {
		setDocument(DocumentHelper.createDocument());
		
		getDocument().addDocType("System-Link", "SYSTEM", "SystemLinkRequest.dtd");
		
		Element root = getDocument().addElement("System-Link").addAttribute("formatForDisplay", "true");
		
		Element request = root.addElement("Request").addAttribute("sessionHandle"
				,theSession == null ? "*current" : theSession.getSessionHandle()).addAttribute(
				"workHandle", "*new").addAttribute("broker","EJB").addAttribute("maxIdle", "1000");
		Element domainEntity = request.addElement("Create").addAttribute("name",
				"queryObject_ItemRevision_Default").addAttribute("domainClass","com.mapics.epdm.ItemRevision")
				.addAttribute("retainResult", "true").addElement("DomainEntity");
		Element key = domainEntity.addElement("Key");
		key.addElement("Property").addAttribute("path", "site").addElement("Value").addCDATA(theItemA.getSite());
        key.addElement("Property").addAttribute("path", "item").addElement("Value").addCDATA(theItemA.getItem());
        key.addElement("Property").addAttribute("path", "revision").addElement("Value").addCDATA(theItemA.getRevision());;  
        domainEntity.addElement("Property").addAttribute("path", "alternateItem").addElement("Value").addCDATA(
        		theItemA.getAlternateItem());
        domainEntity.addElement("Property").addAttribute("path", "batchLotControl").addElement("Value").addCDATA(
        		theItemA.getBatchLotControl());
        domainEntity.addElement("Property").addAttribute("path", "billOfLadingCommodityCode").addElement("Value").addCDATA(
        		theItemA.getBillOfLadingCommodityCode());     
        domainEntity.addElement("Property").addAttribute("path", "carryingRate").addElement("Value").addCDATA(
        		theItemA.getCarryingRate());
        domainEntity.addElement("Property").addAttribute("path", "commissionPercent").addElement("Value").addCDATA(
        		theItemA.getComissionPercent());
        domainEntity.addElement("Property").addAttribute("path", "countryOfOrigin").addElement("Value").addCDATA(
        		theItemA.getCountryOfOrigin());
        domainEntity.addElement("Property").addAttribute("path", "defaultStockLocation").addElement("Value").addCDATA(
        		theItemA.getDefaultStockLocation());
        domainEntity.addElement("Property").addAttribute("path", "department").addElement("Value").addCDATA(
        		theItemA.getDepartment());
        domainEntity.addElement("Property").addAttribute("path", "description").addElement("Value").addCDATA(
        		theItemA.getDescription());
        domainEntity.addElement("Property").addAttribute("path", "dimensionalUm").addElement("Value").addCDATA(
        		theItemA.getDimensionalUm());
        domainEntity.addElement("Property").addAttribute("path", "discreteAllocations").addElement("Value").addCDATA(
        		theItemA.getDiscreteAllocations());
        domainEntity.addElement("Property").addAttribute("path", "drawingNumber").addElement("Value").addCDATA(
        		theItemA.getDrawingNumber());
        domainEntity.addElement("Property").addAttribute("path", "effectiveFromDate").addElement("Value")
        		.addCDATA("19400101");
        domainEntity.addElement("Property").addAttribute("path", "effectiveToDate").addElement("Value")
        		.addCDATA("20391231");
        domainEntity.addElement("Property").addAttribute("path", "harmonizingCodeSpReserved").addElement("Value").addCDATA(
        		theItemA.getHarmonizingCodeSpReserved());
        domainEntity.addElement("Property").addAttribute("path", "height").addElement("Value").addCDATA(
        		theItemA.getHeight());
        domainEntity.addElement("Property").addAttribute("path", "implementationStatus").addElement("Value").addCDATA(
        		theItemA.getImplementationStatus());
        domainEntity.addElement("Property").addAttribute("path", "insideDiameter").addElement("Value").addCDATA(
        		theItemA.getInsideDiameter());
        domainEntity.addElement("Property").addAttribute("path", "inspectOnReceipt").addElement("Value").addCDATA(
        		theItemA.getInspectOnReceipt());
        domainEntity.addElement("Property").addAttribute("path", "inventoryCode").addElement("Value").addCDATA(
        		theItemA.getInventoryCode());
        domainEntity.addElement("Property").addAttribute("path", "itemAccountingClass").addElement("Value").addCDATA(
        		theItemA.getItemAccountingClass());
        domainEntity.addElement("Property").addAttribute("path", "itemClass").addElement("Value").addCDATA(
        		theItemA.getItemClass());
        domainEntity.addElement("Property").addAttribute("path", "itemSalesGroup").addElement("Value").addCDATA(
        		theItemA.getItemSalesGroup());
        domainEntity.addElement("Property").addAttribute("path", "itemTaxClass").addElement("Value").addCDATA(
        		theItemA.getItemTaxClass());
        domainEntity.addElement("Property").addAttribute("path", "itemType").addElement("Value").addCDATA(
        		theItemA.getItemType());
        domainEntity.addElement("Property").addAttribute("path", "kitDocumentPrintOption").addElement("Value").addCDATA(
        		theItemA.getKitDocumentPrintOption());
        domainEntity.addElement("Property").addAttribute("path", "length").addElement("Value").addCDATA(
        		theItemA.getLength());
        domainEntity.addElement("Property").addAttribute("path", "make").addElement("Value").addCDATA(
        		theItemA.getMake());
        domainEntity.addElement("Property").addAttribute("path", "model").addElement("Value").addCDATA(
        		theItemA.getModel());
        domainEntity.addElement("Property").addAttribute("path", "msdsCodeSpReserved").addElement("Value").addCDATA(
        		theItemA.getMsdsCodeSpReserved());
        domainEntity.addElement("Property").addAttribute("path", "naftaCertificationBasis").addElement("Value").addCDATA(
        		theItemA.getNaftaCertificationBasis());
        domainEntity.addElement("Property").addAttribute("path", "naftaPreferCriteria").addElement("Value").addCDATA(
        		theItemA.getNaftaPreferCriteria());
        domainEntity.addElement("Property").addAttribute("path", "naftaRvcFromDate").addElement("Value").addCDATA(
        		theItemA.getNaftaRvcFromDate());
        domainEntity.addElement("Property").addAttribute("path", "naftaRvcToDate").addElement("Value").addCDATA(
        		theItemA.getNaftaRvcToDate());
        domainEntity.addElement("Property").addAttribute("path", "obsoleteItemCodeSpReserved").addElement("Value").addCDATA(
        		theItemA.getObsoleteItemCodeSpReserved());
        domainEntity.addElement("Property").addAttribute("path", "oemProduct").addElement("Value").addCDATA(
        		theItemA.getOemProduct());
        domainEntity.addElement("Property").addAttribute("path", "orderUmClass").addElement("Value").addCDATA(
        		theItemA.getOrderUmClass());
        domainEntity.addElement("Property").addAttribute("path", "outsideDiameter").addElement("Value").addCDATA(
        		theItemA.getOutsideDiameter());
        domainEntity.addElement("Property").addAttribute("path", "packingCode").addElement("Value").addCDATA(
        		theItemA.getPackingCode());
        domainEntity.addElement("Property").addAttribute("path", "piecesPer").addElement("Value").addCDATA(
        		theItemA.getPiecesPer());
        domainEntity.addElement("Property").addAttribute("path", "printOnSalesAnalysis").addElement("Value").addCDATA(
        		theItemA.getPrintOnSalesAnalysis());
        domainEntity.addElement("Property").addAttribute("path", "purchaseTaxIndicator").addElement("Value").addCDATA(
        		theItemA.getPurchaseTaxIndicator());
        domainEntity.addElement("Property").addAttribute("path", "qualityControl").addElement("Value").addCDATA(
        		theItemA.getQualityControl());	
        domainEntity.addElement("Property").addAttribute("path", "salesTaxIndicator").addElement("Value").addCDATA(
        		theItemA.getSalesTaxIndicator());
        domainEntity.addElement("Property").addAttribute("path", "serialNumberRequired").addElement("Value").addCDATA(
        		theItemA.getSerialNumberRequired());
        domainEntity.addElement("Property").addAttribute("path", "shelfLifeInDays").addElement("Value").addCDATA(
        		theItemA.getShelfLifeInDays());
        domainEntity.addElement("Property").addAttribute("path", "specificGravity").addElement("Value").addCDATA(
        		theItemA.getSpecificGravity());
        domainEntity.addElement("Property").addAttribute("path", "standardSetupCostLot").addElement("Value").addCDATA(
        		theItemA.getStandardSetupCostLot());
        domainEntity.addElement("Property").addAttribute("path", "shapeCode").addElement("Value").addCDATA(
        		theItemA.getShapeCode());
        domainEntity.addElement("Property").addAttribute("path", "stockingUm").addElement("Value").addCDATA(
        		theItemA.getStockingUm());
        domainEntity.addElement("Property").addAttribute("path", "supplementaryWeight").addElement("Value").addCDATA(
        		theItemA.getSupplementaryWeight());
        domainEntity.addElement("Property").addAttribute("path", "supplementaryWeightUm").addElement("Value").addCDATA(
        		theItemA.getSupplementaryWeightUm());
        domainEntity.addElement("Property").addAttribute("path", "taxCommodityCode").addElement("Value").addCDATA(
        		theItemA.getTaxCommodityCode());
        domainEntity.addElement("Property").addAttribute("path", "taxWeightUnit").addElement("Value").addCDATA(
        		theItemA.getTaxWeightUnit());
        domainEntity.addElement("Property").addAttribute("path", "unitCostDefault").addElement("Value").addCDATA(
        		theItemA.getUnitCostDefault());
        domainEntity.addElement("Property").addAttribute("path", "unitVolume").addElement("Value").addCDATA(
        		theItemA.getUnitVolume());
        domainEntity.addElement("Property").addAttribute("path", "unitWeight").addElement("Value").addCDATA(
        		theItemA.getUnitWeight());
        domainEntity.addElement("Property").addAttribute("path", "userFieldAmount1").addElement("Value").addCDATA(
        		theItemA.getUserFieldAmount1());
        domainEntity.addElement("Property").addAttribute("path", "userFieldCodeA").addElement("Value").addCDATA(
        		theItemA.getUserFieldCodeA());
        domainEntity.addElement("Property").addAttribute("path", "userFieldCodeB").addElement("Value").addCDATA(
        		theItemA.getUserFieldCodeB());
        domainEntity.addElement("Property").addAttribute("path", "userFieldCodeC").addElement("Value").addCDATA(
        		theItemA.getUserFieldCodeC());
        domainEntity.addElement("Property").addAttribute("path", "userFieldDate1").addElement("Value").addCDATA(
        		theItemA.getUserFieldDate1());
        domainEntity.addElement("Property").addAttribute("path", "userFieldQuantity1").addElement("Value").addCDATA(
        		theItemA.getUserFieldQuantity1());
        domainEntity.addElement("Property").addAttribute("path", "userFieldText25").addElement("Value").addCDATA(
        		theItemA.getUserFieldText25());
        domainEntity.addElement("Property").addAttribute("path", "userFieldText40").addElement("Value").addCDATA(
        		theItemA.getUserFieldText40());
        domainEntity.addElement("Property").addAttribute("path", "valueClass").addElement("Value").addCDATA(
        		theItemA.getValueClass());
        domainEntity.addElement("Property").addAttribute("path", "vendor").addElement("Value").addCDATA(
        		theItemA.getVendor());
        domainEntity.addElement("Property").addAttribute("path", "volumeUm").addElement("Value").addCDATA(
        		theItemA.getVolumeUm());
        domainEntity.addElement("Property").addAttribute("path", "warrantyPeriod").addElement("Value").addCDATA(
        		theItemA.getWarrantyPeriod());
        domainEntity.addElement("Property").addAttribute("path", "warrantyUm").addElement("Value").addCDATA(
        		theItemA.getWarrantyUm());
        domainEntity.addElement("Property").addAttribute("path", "weightUm").addElement("Value").addCDATA(
        		theItemA.getWeightUm());
        domainEntity.addElement("Property").addAttribute("path", "width").addElement("Value").addCDATA(
        		theItemA.getWidth());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.costTechniqueCode")
        		.addElement("Value").addCDATA(theItemB.getCostTechniqueCode());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.currentManufacturingOverheadTableCode")
        		.addElement("Value").addCDATA(theItemB.getCurrentManufacturingOverheadTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.currentManufacturingOverheadThisLevel")
        		.addElement("Value").addCDATA(theItemB.getCurrentManufacturingOverheadThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentMaterialThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentMaterialThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentOther1ThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentOther1ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentOther2ThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentOther2ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.currentOther3ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getCurrentOther3ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.currentOther4ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getCurrentOther4ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentOutsideOperationsThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentOutsideOperationsThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentPurchaseOverheadTableCode")
				.addElement("Value").addCDATA(theItemB.getCurrentPurchaseOverheadTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentRunLaborTableCode")
				.addElement("Value").addCDATA(theItemB.getCurrentRunLaborTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentRunLaborThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentRunLaborThisLevel());        
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.currentRunMachineThisLevel")
        		.addElement("Value").addCDATA(theItemB.getCurrentRunMachineThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentSetupLaborThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentSetupLaborThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionCost.currentSetupMachineThisLevel")
				.addElement("Value").addCDATA(theItemB.getCurrentSetupMachineThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.laborHours")
        		.addElement("Value").addCDATA(theItemB.getLaborHours());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardLotSize")
       			.addElement("Value").addCDATA(theItemB.getStandardLotSize());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardManufacturingOverheadTableCode")
        		.addElement("Value").addCDATA(theItemB.getStandardManufacturingOverheadTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardManufacturingOverheadThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardManufacturingOverheadThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardMaterialThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardMaterialThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardOther1ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardOther1ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardOther2ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardOther2ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardOther3ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardOther3ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardOther4ThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardOther4ThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardOutsideOperationsThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardOutsideOperationsThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardPurchaseOverheadTableCode")
        		.addElement("Value").addCDATA(theItemB.getStandardPurchaseOverheadTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardRunLaborTableCode")
        		.addElement("Value").addCDATA(theItemB.getStandardRunLaborTableCode());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardRunLaborThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardRunLaborThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardRunMachineThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardRunMachineThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardSetupLaborThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardSetupLaborThisLevel());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionCost.standardSetupMachineThisLevel")
        		.addElement("Value").addCDATA(theItemB.getStandardSetupMachineThisLevel());
        if (StringUtils.equalsIgnoreCase("4", theItemA.getItemType())) {
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionPurchase.accountNumber")
        		.addElement("Value").addCDATA(theItemC.getAccountNumber());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionPurchase.allowableDaysEarly")
        		.addElement("Value").addCDATA(theItemC.getAllowableDaysEarly());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.alphaFactor")
				.addElement("Value").addCDATA(theItemC.getAlphaFactor());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.buyer")
				.addElement("Value").addCDATA(theItemC.getBuyer());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.extendedDescription1")
				.addElement("Value").addCDATA(theItemC.getExtendedDescription1());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.extendedDescription2")
				.addElement("Value").addCDATA(theItemC.getExtendedDescription2());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.nature")
				.addElement("Value").addCDATA(theItemC.getNature());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.preApprovedItem")
				.addElement("Value").addCDATA(theItemC.getPreApprovedItem());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionPurchase.purchasePrice")
        		.addElement("Value").addCDATA(theItemC.getPurchasePrice());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionPurchase.receiptRequired")
        		.addElement("Value").addCDATA(theItemC.getReceiptRequired());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.shipVia")
				.addElement("Value").addCDATA(theItemC.getShipVia());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.tolerancePercentReceivingNegative")
				.addElement("Value").addCDATA(theItemC.getTolerancePercentReceivingNegative());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.tolerancePercentReceivingPositive")
				.addElement("Value").addCDATA(theItemC.getTolerancePercentReceivingPositive());
        domainEntity.addElement("Property").addAttribute("path", 
        		"relatedItemRevisionPurchase.weightedDeliveryPercent")
        		.addElement("Value").addCDATA(theItemC.getWeightedDeliveryPercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedEarlyDeliveryPercent")
				.addElement("Value").addCDATA(theItemC.getWeightedEarlyDeliveryPercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedLateDeliveryPercent")
				.addElement("Value").addCDATA(theItemC.getWeightedLateDeliveryPercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedLeadTimePercent")
				.addElement("Value").addCDATA(theItemC.getWeightedLeadTimePercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedOvershipPercent")
				.addElement("Value").addCDATA(theItemC.getWeightedOvershipPercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedPricePercent")
				.addElement("Value").addCDATA(theItemC.getWeightedPricePercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedQualityPercent")
				.addElement("Value").addCDATA(theItemC.getWeightedQualitiyPercent());
        domainEntity.addElement("Property").addAttribute("path", 
				"relatedItemRevisionPurchase.weightedUndershipPercent")
				.addElement("Value").addCDATA(theItemC.getWeightedUndershipPercent());
        }
       }
	@Override
	public void readSuccessfulResponse(Document responseDocument) {
		// TODO Auto-generated method stub
		
	}

}

	